package van.planifolia.factory.abstractfactory;

/**
 * Created by Intellij IDEA<br>
 *
 * @author Planifolia.Van
 * @version 1.0
 * @date 2022/11/8 18:04
 */
public interface NoteFactory {
    void createNoteBook();
}

/**
 * dell的工厂，生产电脑的时候要使用A型号配件
 */
class DellFactory implements NoteFactory{

    @Override
    public void createNoteBook() {
        new KeyBoardA().makeKeyBoard();
        new ScreenA().makeScreen();
        System.out.println("dell笔记本组装完毕");
    }
}
/**
 * 小米的工厂，生产电脑的时候要使用B型号配件
 */
class MiFactory implements NoteFactory{
    @Override
    public void createNoteBook() {
        new KeyBoardB().makeKeyBoard();
        new ScreenB().makeScreen();
        System.out.println("xiaomi笔记本组装完毕");
    }
}
